<!DOCTYPE html>
<html>
    <head>	
        <title>{:C('SERVER_HOME_NAME')}</title>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width">
        <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/style.css" />
    </head>
    <body>
        <div class="box">
            <include file="Public/top" />
            <div class="content">
                <include file="leftNav" />
                <div class="main p10">
                    <div class="editer">
                        <table>
                            <thead>
                                <tr class="col-cen">
                                    <th width="15%">编号</th>
                                    <th width="25%">内容</th>
                                    <th width="20%">日期</th>
                                    <th width="20%">状态</th>
                                    <th width="20%">操作</th>
                                </tr>
                            </thead>
                            <tbody>
                            <volist id="vo" name="dataResult">
                                <tr>
                                    <td>{$vo.id}</td>
                                    <td>{$vo.exposure_content|substr=0,20}</td>
                                    <td>{$vo.add_time}</td>
                                    <td>
                                <if condition="$vo.is_apply eq 0">
                                    未审核  
                                    <elseif condition="$vo.is_apply eq 1" />
                                    已审核
                                    <else/>
                                    不通过
                                </if>
                                </td><td><a href="#" id="{$vo.id}" class='look'>查看</a></td>
                                </tr>
                            </volist>
                            </tbody>		
                        </table>
                        <div class="page">{$page}</div>
                    </div>	
                </div>

            </div>
        </div>

        <div class="look-box">
            <div class="look-content">
                <div class="look-shut"><img src="__PUBLIC__/images/look-close.png"></div>
                <h2>我的曝光-查看</h2>

                <div class="form-group"><span class="form-title">曝光次数：</span><div class="form-content" id="type"></div></div>
                <div class="form-group"><span class="form-title">上传的图片：</span><div class="form-content" id="imgs">
                     
                    </div></div>
                <div class="form-group"><span class="form-title">推送文案：</span><div class="form-content" id="content"></div></div>
                <div class="form-group"><span class="form-title">发布日期：</span><div class="form-content" id="addtime"></div></div>
                <div class="form-group"><span class="form-title">审核状态：</span><div class="form-content" id="status"></div></div>
                 <div class="form-group"><span class="form-title">审核结果：</span><div class="form-content" id="result"></div></div>
            </div>
        </div>
        <script type="text/javascript" src="__PUBLIC__/js/jquery-1.7.min.js"></script>
        <script src="__PUBLIC__/js/page.js"></script>	
        <script>

            //详情弹窗
            $(".editer").on("click", ".look", function () {
                id = $(this).attr("id");
                look(id);
                $(".look-box").fadeIn();
            })
            $(".look-shut").on("click", function () {
                $(".look-box").fadeOut();
            })
            //查看详情
            function look(id)
            {
                $.ajax({
                    type: 'POST',
                    url: '/ExposureOrder/exposureInfo',
                    data: {id: id},
                    dataType: 'json',
                    success: function (data) {
                        if (data.status === 200) {
                            $("#type").text(data.info.package_name);
                            $("#content").text(data.info.exposure_content);
                            $("#status").text(data.info.status);
                            $("#imgs").text("");
                           for (var value in data.info.imgs) {
                              $("#imgs").append("<img src='/Uploads/"+(data.info.imgs)[value]+"'>");
                            }
                            $("#addtime").text(data.info.add_time);
                            $("#result").text(data.info.result);
                        } else {
                            modelConfirm(msg.info);
                        }
                    },
                    error: function (err) {
                        modelConfirm(msg.info);
                    }
                }, JSON);
            }
        </script>	

    </body>
</html>